<template>
  <div class="xl:pl-[100px]">
    <CookieConsent />
    <InstallPrompt />
    <Nav />
    <AnimatePresence>
      <SearchForm v-if="searchOpen" />
    </AnimatePresence>
    <RouterView :key="route.fullPath"/>
    <Footer />
  </div>
</template>
<script setup>
import { AnimatePresence } from "motion-v";
import { useSearchStore } from "@/store/useSearchStore";
import CookieConsent from "@/components/CookieConsent.vue";
import InstallPrompt from "@/components/InstallPrompt.vue";
import Nav from "@/components/Nav.vue";
import Footer from "@/components/Footer.vue";
import SearchForm from "@/components/SearchForm.vue";
import { storeToRefs } from "pinia";
import {useRoute} from "vue-router";

const route = useRoute();

const store = useSearchStore();
const { searchOpen } = storeToRefs(store);
</script>
